Crate itm

source ·
Expand description

itm

A decoder for the ITM and DWT packet protocol as specifed in the ARMv7-M architecture reference manual, Appendix D4. Any references in this code base refers to this document.

Aside from covering the entirety of the protocol, this crate offers two iterators which reads data from the given Read instance:

Usage is simple:

use itm::{Decoder, DecoderOptions};

// or a std::fs::File, or anything else that implements std::io::Read
let stream: &[u8] = &[
    // ...
];
let mut decoder = Decoder::<&[u8]>::new(stream, DecoderOptions { ignore_eof: false });
for packet in decoder.singles() {
    // ...
}

Re-exports

pub use iter::LocalTimestampOptions;

Modules

Structs

ITM/DWT packet protocol decoder.
Decoder configuration.
Iterator that yield TracePacket.
A set of timestamped TracePackets.

Enums

Set of errors that can occur during decode.
Denotes the action taken by the processor by a given exception. (Table D4-6)
Set of malformed TracePackets that can occur during decode.
Denotes the type of memory access.
Timestamp relative to trace clock start with quality descriptions. In order of decreasing quality:
Indicates the relationship between the generation of the local timestamp packet and the corresponding ITM or DWT data packet. (Appendix D4.2.4)
The set of valid packet types that can be decoded.